#include "Sa2dDom.h"

paramSet::paramSet() {
	name = "";
	source ="";
}

string paramSet::getName() {
	return name;
}

int paramSet::getParam_qty() {
	return param_qty;
}

string paramSet::getSource() {
	return source;
}

void paramSet::addParam(string key, string param) {
	this->params[key] = param.c_str();
}

void paramSet::setName(string name) {
	this->name = name;
}

void paramSet::setParam_qty(int param_qty) {
	this->param_qty = param_qty;
}

void paramSet::setSource(string source) {
	this->source = source;
}

map<string, string> paramSet::getParams(){
	return params;
}

string paramSet::toString(int indent) {
	stringstream returnString;
	string tabs = this->getIndent(indent);
	returnString << tabs << "set:" << name << "\n";
	returnString << tabs << "source: " << source << "\n";

	map<string, string>::iterator it;

	for(it = params.begin();it!=params.end();it++){
		returnString << tabs << "key: " << (*it).first << " value: " << (*it).second << "\n";
	}

	return returnString.str();
}
